#include "StdAfx.h"
#include "Rule4Weeks.h"
#include "Datamanager.h"


CRule4Weeks::CRule4Weeks(void)
{
}


CRule4Weeks::~CRule4Weeks(void)
{
}

bool CRule4Weeks::BuySign(PER_DATA* pData)
{
	if (pData->preData ==NULL){
		return false;
	}

	if (	pData->AvData[EAV_23] ==NULL
		||	pData->preData->AvData[EAV_23] ==NULL){
		return false;
	}

	bool bRet = (pData->End - pData->AvData[EAV_23]  > 0.0000001);

	return bRet;
}

bool CRule4Weeks::SellSign(PER_DATA* pData)
{
	if (pData->preData ==NULL){
		return false;
	}
	if (pData->AvData[EAV_23] ==NULL
		||	pData->preData->AvData[EAV_23] ==NULL){
		return false;
	}
	bool bRet = ( pData->End - pData->AvData[EAV_23]  < -0.0000001);	

	return bRet;
}